package com.ebt.m.proposal_v2.retrofit;

import com.ebt.m.proposal_v2.utils.Utils;

import java.util.HashMap;
import java.util.Map;

/**
 * retrofit请求失败信息
 *
 * @author archer.qi
 *         Created on 2017/5/18.
 */
public class ResponseError {
    public String code;
    public String message;
    public String type;
    public int flag; // flag == 1时，为业务异常信息

    @Override
    public String toString() {
        Map<String, Object> maper = new HashMap<>();
        maper.put("code", code);
        maper.put("message", message);
        maper.put("type", type);
        maper.put("flag", flag);
        return Utils.toString(getClass().getSimpleName(), maper);
    }
}
